package by.amakarevich.datamodel;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;

@Entity
public class Booking implements Serializable {
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	@Column
	@NotNull
	private Boolean status;
	
	@Column
	@NotNull
	private Boolean payStatus;
	
	@Column
	@NotNull
	private Boolean canceled;
	
	@Column
	@NotNull
	private Date received;
	
	@Column
	@NotNull
	private Date deadlines;
	
	@Column
	@NotNull
	private Long totalPrice;
	
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = UserAccount.class)
	@JoinColumn(name = "user_account_id", nullable = false)
	private UserAccount userAccount;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	public Boolean getPayStatus() {
		return payStatus;
	}
	public void setPayStatus(Boolean payStatus) {
		this.payStatus = payStatus;
	}
	public Boolean getCanceled() {
		return canceled;
	}
	public void setCanceled(Boolean canceled) {
		this.canceled = canceled;
	}
	public Date getReceived() {
		return received;
	}	
	public void setReceived(Date received) {
		this.received = received;
	}
	public Date getDeadlines() {
		return deadlines;
	}
	public void setDeadlines(Date deadlines) {
		this.deadlines = deadlines;
	}
	public Long getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(Long totalPrice) {
		this.totalPrice = totalPrice;
	}
	public UserAccount getUserAccount() {
		return userAccount;
	}
	public void setUserAccount(UserAccount userAccount) {
		this.userAccount = userAccount;
	}

	
}
